<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>教师界面|教师个人信息</title>
		<link rel="stylesheet" type="text/css" href="css/identify.css" />
		<link rel="stylesheet" type="text/css" href="css/layout.css" />
		<link rel="stylesheet" type="text/css" href="css/account.css" />
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/control_index.css" />
		<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="js/layer/layer.js"></script>
		<script type="text/javascript" src="js/haidao.offcial.general.js"></script>
		<script type="text/javascript" src="js/select.js"></script>
		<script type="text/javascript" src="js/haidao.validate.js"></script>

	</head>

	<body>
		<div class="view-topbar">
			<div class="topbar-console">
				<div class="tobar-head fl">
				<a class="topbar-home-link topbar-btn text-center fl" style="width: 180px; border-right: 1px solid #008fbf;"><span>教师端|教师管理界面</span></a>
				</div>
			</div>
			<div class="topbar-info">
				<ul class="fr">

					<li class="fl topbar-info-item">
					</li>
					<li class="fl topbar-info-item">
					<div class="dropdown">
						<a href="#" class="topbar-btn">
						
						<span id='username' class="fl text-normal" >李老师</span>
						<span class="icon-arrow-down"></span>
						</a>
						<ul class="dropdown-menu">
							<li><a href="login.html">退出</a></li>
						</ul>
					</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="view-body">
			<div class="view-sidebar">
				<div class="sidebar-content">
					<div class="sidebar-nav">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">教师信息</span>
							</a>
						</div>
						<ul class="sidebar-trans">
							<li>
								<a href="#" id="link1">
									<b class="sidebar-icon"></b>
									<span class="text-normal">个人信息</span>
								</a>
							</li>
							<li>
								<a href="#" id="link2">
									<b class="sidebar-icon"></b>
									<span class="text-normal">修改密码</span>
								</a>
							</li>

						</ul>
					</div>
					<div class="sidebar-nav">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">学生成绩管理</span>
							</a>
						</div>
						<ul class="sidebar-trans">
							<li>
								<a  href="#" id="link3">
									<b class="sidebar-icon"></b>
									<span class="text-normal">查看教师信息</span>
								</a>
							</li>
							<li>
								<a  href="#" id="link4">
									<b class="sidebar-icon"></b>
									<span class="text-normal">登记学生成绩</span>
								</a>
							</li>
							<li>
								<a  href="#" id="link5">
									<b class="sidebar-icon"></b>
									<span class="text-normal">成绩查询</span>
								</a>
							</li>
							<li>
								<a href="#" id="link6">
									<b class="sidebar-icon"></b>
									<span class="text-normal">成绩分析</span>
								</a>
							</li>
							<li>
								<a href="#" id="link7">
									<b class="sidebar-icon"></b>
									<span class="text-normal">成绩反馈</span>
								</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

	<div class="view-product">
			<div class="manage account-manage">
				<div class="manage-head">
						<h6 class="layout padding-left manage-head-con" ">教师信息</h6>
					

				     <dl class="account-basic clearfix" id="teacher_info>
						<dt class="fl">
									<span class="fr icon-head">
										<img src="Images/noavatar_middle.gif" alt="账户头像">
									</span>
						</dt>
										<div class="manage-head">
						<h6 class="padding-left manage-head-con">教师信息</h6>
				</div>
				<div class="manage-detail">
						<h6 class="h5 text-big" style="margin-left:400px">该界面显示教师信息</h6>
						
				</div>
				<div id="elems">
				     <div class="manage-detail">
						
						<div class="margin-tb manage-detail-con clearfix">
							<span class="h5 fl" style="margin-left:50px"><em class="h2">教师姓名 </em></span>
							<p class="h5 fl text-big" style="margin-top:10px;margin-left:280px;" id="teacher_name">undefined</p>
							
						</div>
					</div>
					<div class="manage-detail">
						
						<div class="margin-tb manage-detail-con clearfix">
							<span class="h5 fl" style="margin-left:50px"><em class="h2">教师工号 </em></span>
							<p class="h5 fl text-big" style="margin-top:10px;margin-left:280px;" id="teacher_number">undefined</p>
							
						</div>
					</div>
					<div class="manage-detail">
						
						<div class="margin-tb manage-detail-con clearfix">
							<span class="h5 fl" style="margin-left:50px"><em class="h2">专业</em></span>
							<p class="h5 fl text-big" style="margin-top:10px;margin-left:325px;" id="teacher_major">undefined</p>
		
						</div>
					</div>
					<div class="manage-detail">
						
						<div class="margin-tb manage-detail-con clearfix">
							<span class="h5 fl" style="margin-left:50px" "><em class="h2">用户ID </em></span>
							<p class="h5 fl text-big" style="margin-top:10px;margin-left:305px;" id="teacher_id">undefined</p>
							
						</div>
					</div>
				</div>
				  </dl>
			</div>
		</div>
	</div>	
<script>
		   var str=location.href;
	       var num=str.indexOf("?");
	       var str1=str.substr(num+1);
	       var username=str1.split("=")[1];
	       var text=document.getElementById("username");
	       //text.innerHTML=username;
           document.getElementById('link1').href="teacher_info.html"+"?"+"username="+username;
           document.getElementById('link2').href="teacher_repassword.html"+"?"+"username="+username;
           document.getElementById('link3').href="teacher_query_info.html"+"?"+"username="+username;
           document.getElementById('link4').href="teacher_score_input.html"+"?"+"username="+username;
           document.getElementById('link5').href="teacher_query_score.html"+"?"+"username="+username;
           document.getElementById('link6').href="teacher_score_anlysis.html"+"?"+"username="+username;
           document.getElementById('link7').href="teacher_score_feedback.html"+"?"+"username="+username;
</script>
		<script>
		function getXmlHttpObject(){
				var xmlHttpRequest;
				if(window.ActiveXObject){
				}else{
					xmlHttpRequest=new XMLHttpRequest();
				}
				return xmlHttpRequest;
			}
			myXmlHttpRequest=getXmlHttpObject();
			function progress(){
				if(myXmlHttpRequest.readyState==4){	
					var json=myXmlHttpRequest.responseText;
					var json_obj=eval("("+json+")");
					var meta=json_obj.meta;
					if(meta.state=="success"){
						var per=json_obj.data;
						document.getElementById("teacher_name").innerHTML=per.teachername;
						document.getElementById("teacher_number").innerHTML=per.teanum;
						document.getElementById("teacher_major").innerHTML=per.major;
						document.getElementById("teacher_id").innerHTML=per.user_id;
					}
					else{
						window.alert(meta.message);
					}
				}
			}
            function LoadTeacherInfo() {
             if(myXmlHttpRequest){
					var url="http://localhost:8080/StuScoreSystem/Teacher?method=queryTeacherByteanum&teanum="+username;
					myXmlHttpRequest.open("get",url,true);
					myXmlHttpRequest.onreadystatechange=progress;
					myXmlHttpRequest.send(null);
				}
				else{
					window.alert("error");
				}
            }
             LoadTeacherInfo()	
		</script>
 <script>

 
 </script>	
		<script>
			$(".sidebar-title").live('click', function() {
				if ($(this).parent(".sidebar-nav").hasClass("sidebar-nav-fold")) {
					$(this).next().slideDown(200);
					$(this).parent(".sidebar-nav").removeClass("sidebar-nav-fold");
				} else {
					$(this).next().slideUp(200);
					$(this).parent(".sidebar-nav").addClass("sidebar-nav-fold");
				}
			});
		</script>
	</body>

</html>